---
language: node_js

node_js:
  - node
  - "6"

cache:
  yarn: true
  directories:
    - node_modules

env:
  global:
    - NODE_ENV=development
  matrix:
    - JOB=test AST_COMPARE=1

matrix:
  fast_finish: true
  include:
    - node_js: "node"
      env: JOB=lint

install:
  - yarn install

before_script:
  - yarn check-deps

script:
  - if [ "${JOB}" = "lint" ]; then yarn lint && yarn lint-docs; fi
  - if [ "${JOB}" = "test" ]; then yarn test --runInBand --ci; fi
  - if [ "${JOB}" = "test" ]; then yarn codecov; fi

branches:
  only:
    - master
